Repository navigation
fix(text): align right-to-left text to the right on web - #5265
Merged
Merged
Conversation
Text and AnimatedText set `textAlign: 'left'`. Android and iOS align that to the right when the layout is right-to-left, but browsers keep it physical, so on web List.Item titles, List.Subheader and the Appbar title stayed on the left in RTL while rows and icons mirrored. On web, both now align right when Paper's direction is `rtl`. Android, iOS, left-to-right text and a `textAlign` passed in `style` are unchanged.
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
src/components/Typography/Text.tsx:95 |
Default web RTL text alignment changed with no note in the RTL guide |
1 finding below minor hidden (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (295f36b5e27b).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 7c180b1. The verdict and the full list are in the summary comment.
kachmashk
approved these changes
Nov 20, 2026
Text and AnimatedText now take their default alignment from `getTextAlignStyle` in `Typography/utils.ts`, so the two can't drift apart. rtl.md and the migration guide's Text section now say that on web a `Text` under `direction="rtl"` aligns right, and that a `textAlign` in `style` still wins. Nothing renders differently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
On web in RTL (
<html dir="rtl">plusdirection="rtl"onPaperProvider), rows and icons mirror butTextstays left: List.Item titles, List.Subheader, the Appbar title.TextsetstextAlign: 'left', which Android and iOS flip in RTL but browsers keep.On web,
TextandAnimatedTextnow align right when Paper's direction isrtl. Native, left-to-right and atextAligninstyleare unchanged. The RTL and migration guides now say so.Related issue
No issue.
Screenshots / Videos
List.Section on web in RTL, before and after:
Test plan